﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
//using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace RainmeterCustomized
{
    public partial class AboutForm : Form
    {
        public AboutForm()
        {
            InitializeComponent();
        }

        private String AboutDetail()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("本程序为Rainmeter桌面个性化工具的辅助工具，");
            sb.Append("用于简化个性化皮肤的制作过程，");
            sb.Append("您可以免费使用本程序乃至反编译、修改本程序，");
            sb.Append("但是请您尊重原作者的知识产权，请勿窃取别人的劳动成果，");
            sb.Append("也强烈反对您将本软件用于任何商业用途，也反对您将本软件上传用于获取积分、金币等操作。");
            sb.AppendLine("希望您能够免费传播。\r\n");
            sb.AppendLine("鸣谢：");
            sb.AppendLine("我的家人");
            sb.AppendLine("我的朋友pc，aj以及其他帮助过我的朋友");
            sb.AppendLine("雨滴论坛");
            sb.AppendLine("开源世界");          
            sb.AppendLine("党和国家");
            return sb.ToString();
        }

        private void AboutForm_Load(object sender, EventArgs e)
        {
            Image img = Properties.Resources.ali;
            Image img2 = new Bitmap(pictureBox1.Width, pictureBox1.Height);
            Graphics graphics = Graphics.FromImage(img2);
            pictureBox1.Size = img2.Size;
            graphics.DrawImage(img, new Rectangle(0, 0, img2.Width, img2.Height));
            pictureBox1.Image = img2;
            graphics.Dispose();
            textBox1.Text = AboutDetail();
            textBox1.ReadOnly = true;
            Version ApplicationVersion = new Version(Application.ProductVersion);
            versionLabel.Text = ApplicationVersion.ToString();//获取主版本号   
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
